from flask import Flask, render_template
from auth import bp as auth_bp
from blog import bp as blog_bp

def create_app():
    app = Flask(__name__)
    app.secret_key = 'your-secret-key'

    app.register_blueprint(auth_bp)
    app.register_blueprint(blog_bp)

    @app.route('/')
    def home():
        return render_template('home.html', title='首页')

    return app

if __name__ == '__main__':
    app = create_app()
    app.run(debug=True)